package com.paziy.jan.fraction.operations;

import com.paziy.jan.fraction.FMath;
import com.paziy.jan.fraction.Fraction;
import com.paziy.jan.fraction.Operation;

/**
 * Created with IntelliJ IDEA.
 * User: paziy
 * Date: 31.10.12
 * Time: 11:20
 * To change this template use File | Settings | File Templates.
 */
public class Division implements Operation {

    Fraction[] fractions;

    public Division (Fraction... fractions) {
        this.fractions = fractions;
    }

    public Object apply(Fraction fr) {
        Fraction result = FMath.multiplication(fractions);

        return FMath.division(fr, result);
    }
}
